/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package M30;

import java.util.Enumeration;
import java.util.Hashtable;

/**
 *
 * @author Administrator
 */
public class MapDemo1 {
    public static void main(String[] args) {
        Hashtable s = new Hashtable();
        s.put("Jone",new Integer(90));
        s.put("令狐冲",new Integer(100));
        s.put("john",new Integer(50));
        
        System.out.println("hashtable的内容是：");
        System.out.println(s);
        
        Enumeration e= s.elements();
        while(e.hasMoreElements()){
            Integer tmp = (Integer) e.nextElement();
            System.out.print(tmp.intValue()+" ");
        }
        System.out.println("Jone的成绩是：");
        System.out.println(s.get("Jone"));
        if(s.containsValue(90)){
            System.out.println("yes!");
        }else{
            System.out.println("查无此人");
        }
    }
}
